# __coding:utf-8__
from urllib.request import urlopen;
from bs4 import BeautifulSoup;

# html = urlopen('http://blog.sina.com.cn/s/articlelist_1634106437_0_1.html');
# bs_obj = BeautifulSoup(html.read(), 'lxml');
#
# lists = bs_obj.find_all('div',{'class':'articleList'});
# for list in lists:
#     print(list.a)

# # 1. 处理子标签和其他后代标签
# html = urlopen("http://blog.sina.com.cn/s/articlelist_1634106437_0_1.html")
# bsObj = BeautifulSoup(html)
# for child in bsObj.find("div",{"class":"articleList"}).span:
#     print(child)

html = urlopen("http://blog.sina.com.cn/yuxiuhua1976")
bsObj = BeautifulSoup(html, 'lxml')

for link in bsObj.findAll("a"):
    print( link);
    # if 'href' in link.attrs:
    #     print(link.attrs['href'])
